{{#*inline 'getDefaultOpends' items}}
{{#each items as | item |}}
    {{~#if item.openDefault~}}
'{{item.name}}',
    {{~/if~}}
    {{#if item.psAppMenuItems}}
{{> getDefaultOpends items=item.psAppMenuItems}}
    {{/if}}
{{/each}}
{{/inline}}
{{#*inline 'getDefaultExpand' items}}
{{#each items as | item |}}
    {{~#if item.expanded~}}
'{{item.name}}',
    {{~/if~}}
    {{#if item.psAppMenuItems}}
{{> getDefaultExpand items=item.psAppMenuItems}}
    {{/if}}
{{/each}}
{{/inline}}
function getConfig() {
    return {
        caption: '{{ctrl.caption}}',
        codeName: '{{ctrl.codeName}}',
        controlType: '{{ctrl.controlType}}',
        defaultActive: '',
        defaultOpeneds: [{{> getDefaultOpends items=ctrl.psAppMenuItems}}],
        name: '{{ctrl.name}}',
        menus: [
            {{#each ctrl.psAppMenuItems as | item |}}
            {{> @macro/widgets/menu-detail/include-menu.hbs type=item.itemType item=item}}
            {{/each}}
        ]
    }
}

export const model = getConfig()